package com.hysoft.cxf.ws.impl;

import java.util.Date;
import java.util.List;
import java.util.Map;

import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;

import com.hysoft.cxf.po.Cat;
import com.hysoft.cxf.service.UserService;
import com.hysoft.cxf.ws.HelloWorld;
import com.hysoft.cxf.ws.utils.StringCat;

@WebService(endpointInterface = "com.hysoft.cxf.ws.HelloWorld", serviceName = "HelloWorld",targetNamespace="http://ws.cxf.hysoft.com/")
@SOAPBinding(style = Style.DOCUMENT)
public class HelloWorldImpl implements HelloWorld {

	private UserService userService;

	@Override
	public String sayHi(String username) {
		return username + "   say:Hello World" + new Date();
	}

	@Override
	public List<Cat> getCatsByUser(String username) {
		return userService.getCatsByUser(username);
	}

	@Override
	public Map<String, Cat> getAllCats1() {
		return userService.getAllCats();
	}

	@Override
	public Map<String, Cat> getAllCats2() {
		return userService.getAllCats();
	}
	
	@Override
	public StringCat getAllCats3() {
		return userService.getStringCat();
	}

	public void setUserService(UserService userService) {
		this.userService = userService;
	}

}
